        assemblyFileName = ((getdir #scripts) as string + "/WindowsControl.dll")
        dotnet.LoadAssembly "f:/script/dotnet/WindowsControl.dll" 
        rollout TestRoll "test"
        (
        
        	dotNetControl dnMouseWindow  "WindowsControl.MouseWindow"  width:100 height:100 align:#left
        	local oldpos = [0,0]
        
--         	on dnMouseWindow PosEvent a b  do format "pos: %, %\n" b.x b.y
        	on dnMousewindow DoubleClick do dnMousewindow.SetPos 0 0
        	on dnMousewindow mouseDown do 
        	(
        		oldPos.x  = (dnMousewindow.getPos()).x
        		oldpos.y = (dnMousewindow.getPos()).y
        	)
        	on TestRoll open do
        	(
        		
        		dnMousewindow.SetRange -100 -100 100 100 -- bottom left x y topright x y : default 0,0 1,1
        		--top right will always have higher values than bottom left 
        		--If values are the wrong way round the SetRange function swaps them rather than throwing and error.
        		dnMousewindow.SetPos 0 0  -- set the cross position after setting the range values.
        		-- if SetPos is out of range the value is clamped.
        	)
        )
        
        if 	TestWindow != undefined then CloseRolloutFloater TestWindow
        TestWindow = NewRolloutFloater "" 400 300
        
        AddRollout TestRoll TestWindow